50 INPUT "1/2 x min:",x1:xmin=x1*2:INPUT "1/2 x max:",x2:xmax=x2*2:INPUT "y min:",ymin,"y max:",ymax,"definition:",p:H=xmax-xmin:V=ymax-ymin:INPUT "graduation:",G:IF G<>0 THEN INPUT "% error:",t
60 CLS:X0=-xmin*32/H:Y0=INT(ymax*7/V)+.5:FOR Y=0 TO 7:LOCATE X0,Y:PRINT CHR$(255);:NEXT Y:FOR X=0 TO 30:LOCATE X,Y0:PRINT "-";:NEXT :LOCATE X0,Y0:PRINT "+";:IF Y0<7 AND X0<31 THEN LOCATE 31,Y0:PRINT "-";
70 IF G=1 THEN GOSUB 1000
80 FOR l=0 TO 31 STEP p:x=(l-X0)*(H/32):h=Y0-VALF(A$)*8/V
90 q=FRACh:a$=CHR$(253)
100 IF q<.4 THEN a$=CHR$(252)
110 IF q>.6 THEN a$=CHR$(254)
120 IF h=7 AND l=31 THEN 140
130 IF h>=0 AND h<8 THEN LOCATE l,h:PRINT a$;
140 NEXT :LOCATE X0,Y0:IF G=2 THEN GOSUB 1000
150 STOP:GOTO 10
160 NEXT :LOCATE X0,Y0:IF G=2 THEN GOSUB 1000
170 IF ERR=2 THEN 10 ELSE RESUME NEXT
180 FOR l=0 TO 31:x=(l-X0)*(H/32):IF l<32 AND x<10 AND x>=0 AND (FRACx)<=t THEN LOCATE l,Y0:PRINT CHR$(144+x);
190 NEXT :Y1=Y0:Y0=INTY0:FOR h=0 TO 7:y=(Y0-h)*(V/8):IF FRACy<=t AND y=>0 AND y<10 THEN LOCATE X0,h:PRINT CHR$(144+y);